@extends('mobile_end.layouts.default')
{{-- content_header --}}

@section('container')

<div id="nav">
    <ul>
        <li><a href="{{ URL::to('mobile_end/foods/index') }}">所有品类</a></li>
        @foreach($menus as $menu)
        <li><a href="{{ URL::to('mobile_end/foods/index').'?menu_id='.$menu->id }}">{{ $menu->name }}</a></li>
        @endforeach
    </ul>
</div>
<ul class="data-list">

    @foreach($entries as $entry)
    @include('mobile_end.layouts._food_list_li', array('entry'=>$entry))
    @endforeach

</ul>

<div class="pagination">
    {{ $entries->links('pagination::mobile') }}
</div>
@stop

@section('scripts')

<script>
    $('#nav').navigator();



    //设置顶部菜单栏的激活状态
    var currentUrl = window.location.href;
    $('.ui-navigator-list li').removeClass('ui-state-active');
    $('.ui-navigator-list a').each(function(){
        if($(this).attr('href') == currentUrl){
            $(this).parent('li').addClass('ui-state-active');
        }
    });
</script>

@stop